package com.banksoft.cps.service;

import com.banksoft.cps.bean.User;
import com.banksoft.cps.bean.common.ServiceException;
import com.banksoft.cps.util.StrGenerator;

/**
 * Created by rongzhao.zhu on 2017/12/20.
 */
public interface UserService {

    void updatePassword(String id,String oldPassword,String newPassword)throws ServiceException;

    default  String token(User user) {
        return StrGenerator.EncoderByMd5(user.getName() +  StrGenerator.generateRandomStr(4));
    }

}
